package com.itbaizhan.controller;

import com.itbaizhan.produce.MessageProduce;
import org.apache.rocketmq.client.producer.SendResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MessageController {

    @Autowired
    private MessageProduce messageProduce;


    @GetMapping("/send")
    public SendResult send(String  message){
        return messageProduce.sendMessage(message);
    }


}
